package ticketmachine.logic.priceStrategies;

import ticketmachine.logic.Station;
import ticketmachine.logic.Ticket;

	public class PriceCalculatorWeek implements IPriceCalculatorStrategy {

		@Override
		public float calculatePrice(Ticket t) {

                        

			float basePrice=t.getDescription().getBasePrice();
			int distance=Station.calculateDistance(t.getSource(), t.getDestination());

                        //TEST
                        System.out.println("Calculating ticket price for weekly ticket");
                        System.out.println("Distance between  " + t.getSource().getName() +  " and  " + t.getDestination().getName() + "  is " + distance);
                        System.out.println("Calculating the price according to formula 300+10*distance, where distance is " + distance);

			return 300+10*distance;
		}

	}